#ifndef _TABLESTRUCT_H_
#define _TABLESTRUCT_H_

#include "stdafx.h"

class CTableStruct : public ITableStruct, public CUnknownImp
{
public:
    CTableStruct();
    virtual ~CTableStruct();

    BEGIN_STDCOM_MAP
    STDCOM_INTERFACE_ENTRY(ITableStruct)
    STDCOM_INTERFACE_ENTRY_UNKNOWN_(ITableStruct)
    END_STDCOM_MAP

public:
    std_method(AddTableRecord)(const FieldSturct& field);
    std_method(GetTableRecord)(FieldSturct* field, ULONG loop);
    std_method(GetTableRecords)(FieldSturct fields[], ULONG count);
    std_method(ClearTableRecord)();
    std_method(GetFieldsCount)(ULONG& count);
    std_method(SetKeyValue)(LPCSTR key, LPCSTR value);
    std_method(GetKeyValue)(LPCSTR key, LPSTR value);
    std_method_(UINT, IsExist)();
    std_method_(UINT, GetOp)();
    std_method_(UINT, GetLevel)();

private:
    string m_strTableName;
    UINT m_uOp;
    UINT m_uSave;
    Table m_vecTableFields;
};
#endif
